#include<iostream>
#include<ctime>
#include<cstdlib>
using namespace std;

int main() {
	srand(time(NULL));
	char s[10];
	for(int i = 0; i < 10; i++) {
		s[i] = (char)(rand() % 26 + 65);
	}
	cout << s << endl;
	for(int i = 0; i < 10; i++) {
		for(int j = 0; j < 26; j++) {
			char temp = (char)(65 + j);
			if(temp == s[i]) {
				cout << temp;
			} 
		}
	}
	return 0;
} 
